Video image data processing in electronic devices

ABSTRACT

In some embodiments, an electronic device for compressing video image data includes a housing, an image sensor, a memory device, and one or more processors. The image sensor can generate image data from light incident on the image sensor. The one or more processors can transform the image data to obtain transform coefficients, quantize the transform coefficients, encode the quantized transform coefficients, and store the quantized transform coefficients to the memory device. The one or more processors can encode the quantized transform coefficients at least by determining a range of multiple ranges in which one transform coefficient is included, determining a value within the range to which the one transform coefficient corresponds, encoding using a first algorithm the range as a range code, and encoding using a second algorithm the value as a value code.

CROSS-REFERENCE TO RELATED APPLICATIONS

Any and all applications for which a domestic priority claim isidentified in the Application Data Sheet of the present application arehereby incorporated by reference under 37 CFR 1.57.

BACKGROUND

High-end video capture capability continues to advance. Professionalcinematographers as well as increasingly large numbers of consumers aredemanding high quality video recording capability, not only intraditional digital video cameras, but also in other videocamera-equipped electronic devices including cellphones/smart phones,tablets, and the like.

SUMMARY

Various embodiments described herein relate to image capture devicescapable of capture and on-board storage of compressed raw (for example,mosaiced according to a Bayer pattern color filter array or according toanother type of color filter array), high resolution (for example, atleast 2k, 4k, 6k, 8k, 10k, or ranges of values between any of theseresolution levels) video image data. The compressed raw image data canbe “raw” in the sense that the video data is not “developed”, such thatcertain image processing image development steps are not performed onthe image data prior to compression and storage. Such steps can includeone or more of interpolation (for example, de-Bayering or otherde-mosaicing), color processing, tonal processing, white balance, andgamma correction. For example, the compressed raw image data can be oneor more of mosaiced (for example, not color interpolated, notdemosaiced), not color processed, not tonally processed, not whitebalanced, and not gamma corrected. Rather, such steps can be deferredfor after storage, such as for off-board post-processing, therebypreserving creative flexibility instead of than “baking in” particularprocessing decisions in camera.

The image processing and compression techniques described herein can beimplemented in a variety of form factors. For instance, the techniquesdescribed herein for compressing and on-board storage of compressed rawimage data can be implemented in a relatively small-form factor device,such as a smart phone having an integrated camera (or multiple camerasincluding front camera(s) and rear camera(s), or a small form factorcamera. For instance, the processing techniques according to certainembodiments are tailored for implementation in a small form factordevice having relatively limited power budget, processing capability,and physical real estate for incorporation of electronic components,etc. In another example, the compression techniques described herein canbe implemented in relatively larger form factor cameras, includingdigital cinema cameras.

According to certain aspects, an image capture device can be configuredto capture raw mosaiced image data, compress the raw image data, andstore the image data in on-board memory of the image capture device.

Electronics residing of the image capture device can be configured to,as part of the compression, transform the raw mosaiced image data usinga discrete cosine transform (DCT) or another transform (such as atransform that defines a finite sequence of data points in terms of asum of functions oscillating at different frequencies) to obtaintransform coefficients, and compress the transform coefficients.According to some embodiments, the electronics can be configured toperform the compression without using an image frame memory (forexample, a dynamic random access memory [DRAM]) that stores a full imageframe for processing purposes. For instance, the electronics cancompress the transform coefficients using an on-chip first memory (forexample, a static random-access memory [SRAM]) that is integrated withan image processing chip (for example, an application specificintegrated circuit [ASIC] or field-programmable gate array (FPGA]), andwithout using any second DRAM or other memory positioned off-chip.

In certain embodiments, the electronics can nonetheless include a DRAMor other second memory off-chip. However, the off-chip memory in suchembodiments may used for purposes other than compression of raw videoimage data, such as for pixel defect correction, addressing pixelpattern noise, or the like. This is unlike existing image capturedevices, such as smart phones, which use an off-chip DRAM to performimage compression. For instance, some existing image capture devices usean off-chip DRAM to calculate motion vectors for H.264 compression.Certain embodiments described herein use DCT techniques, therebyfacilitating memory-efficient compression, without the need to calculatemotion vectors or use off-chip memory.

Performing compression without use of a full image frame memory (forexample, an off-chip DRAM) enhances power efficiency (such as, by around0.5 Watts (W) in some implementations), which is particularly useful ina small-form factor device such as a smart phone. According to certainaspects, the electronics of the image capture device consume less than15 W or less than about 20 W during operation.

Features disclosed herein can, in certain embodiments, provideapproaches for decoding as much of a frame as possible in real time andmay enable decompression at a rate faster than 24 frames per second(fps). Moreover, the approaches can, in some implementations, makeextensive use of a Graphical Processing Unit (GPU) of an electronicdevice and permit significant parallelization of operations whileenabling a high image quality to be maintained.

According to some aspects, the image capture device includes a clockconfigured to control a timing at which the raw mosaiced image data isprocessed (for instance, compressed) by electronic circuitry, and theelectronic circuitry is configured to correctly process the raw mosaicedimage data despite the clock stopping for a period of time. This may beat least because the raw mosaiced image data can be processed by theelectronic circuitry using memory that may not require refreshing.

According to certain aspects, the image capture device is configured totransform raw mosaiced image data to obtain transform coefficients. Thedevice quantizes the transform coefficients to obtain quantizedcoefficients, and encodes at least some of the quantized coefficients byperforming one or more of the following: dividing each quantizedcoefficient into a plurality of ranges and values within the pluralityof ranges; determining a Huffman code for each quantized coefficientaccording to an individual range in which each quantized coefficient isincluded; and determining a Golomb code for each quantized coefficientaccording to an individual value within the individual range in whicheach quantized coefficient is included.

In some embodiments, an electronic device is disclosed. The electronicdevice includes a housing, an image sensor, a memory device, and one ormore processors. The image sensor can generate image data from lightincident on the image sensor. The one or more processors can: transformthe image data to obtain transform coefficients, quantize the transformcoefficients to obtain quantized transform coefficients including afirst quantized transform coefficient and a second quantized transformcoefficient different from the first quantized transform coefficient,encode the quantized transform coefficients to obtain encodedcoefficients, and store the encoded coefficients to the memory device.The quantized transform coefficients can be encoded at least by:determining a first range of a plurality of ranges in which the firstquantized transform coefficient is included, determining a second rangeof the plurality of ranges in which the second quantized transformcoefficient is included, determining a first value within the firstrange to which the first quantized transform coefficient corresponds,determining a second value within the second range to which the secondquantized transform coefficient corresponds, encoding, using a firstalgorithm, the first range as a first range code and the second range asa second range code, and encoding, using a second algorithm differentfrom the first algorithm, the first value as a first value code and thesecond value as a second value code. The encoded coefficients caninclude the first range code, the second range code, the first valuecode, and the second value code.

The electronic device of the preceding paragraph can include one or moreof the following features: The first algorithm is a Huffman code, or thesecond algorithm is a Golomb code. The one or more processors can varythe first algorithm during processing of the image data. The one or moreprocessors can vary the first algorithm from processing a first frame ofthe image data to processing a second frame of the image data. Thesecond algorithm can remain constant during processing of the image databy the one or more processors. The quantized transform coefficients caninclude a third quantized transform coefficient different from the firstquantized transform coefficient and the second quantized transformcoefficient, and the one or more processors can encode the quantizedtransform coefficients by at least: determining a third range of aplurality of ranges in which the third quantized transform coefficientis included, not determining a third value within the third range towhich the third quantized transform coefficient corresponds, andencoding, using the first algorithm, the third range as a third rangecode, the encoded coefficients comprising the third range code. The oneor more processors can transform the image data using a discrete cosinetransform. The discrete cosine transform can be a 16×16 discrete cosinetransform. The one or more processors can encode the quantized transformcoefficients at least by encoding DC coefficients of the quantizedtransform coefficients differently from AC coefficients of the quantizedtransform coefficients. The one or more processors can store a parameterfor the first algorithm in a frame header for the encoded coefficients.The one or more processors can quantize the transform coefficients by atleast using a first quantization table for green pixels of the imagedata and a second quantization table for red pixels and blue pixels ofthe image data, the first quantization table being different from thesecond quantization table. The image data can be moasiced image data.The image data can be raw moasiced image data. The housing can be amobile phone housing, and the mobile phone housing can support the imagesensor, the memory device, and the one or more processors. The housingcan enclose the image sensor, the memory device, and the one or moreprocessors, and the housing can removably attach to a mobile phone. Theelectronic device can further include a display configured to presentholographic images generated by the one or more processors from theimage data.

In some embodiments, a method of coding image data using an electronicdevice is disclosed. The method can include: generating, by an imagesensor, image data from light incident on an image sensor; transforming,by one or more processors, the image data to obtain transformcoefficients; quantizing, by the one or more processors, the transformcoefficients to obtain quantized transform coefficients including afirst quantized transform coefficient and a second quantized transformcoefficient different from the first quantized transform coefficient;determining, by the one or more processors, a first range of a pluralityof ranges that includes the first quantized transform coefficient and asecond range of the plurality of ranges that includes the secondquantized transform coefficient; determining, by the one or moreprocessors, a first value within the first range that corresponds to thefirst quantized transform coefficient and a second value within thesecond range that corresponds to the second quantized transformcoefficient; encoding, by the one or more processors, the first range asa first range code and the second range as a second range code;encoding, by the one or more processors, the first value as a firstvalue code and the second value as a second value code; and storing thefirst range code, the second range code, the first value code, and thesecond value code to the memory device.

The method of the preceding paragraph can include one or more of thefollowing features: The encoding the first and second ranges and theencoding the first and second values can be performed using losslesscompression. The encoding the first and second ranges and the encodingthe first and second values can be performed using variable lengthcoding. The method can further include: retrieving the first range code,the second range code, the first value code, and the second value codefrom the memory device; and decoding, by the one or more processors, thefirst range code, the second range code, the first value code, and thesecond value code to obtain the first range, the second range, the firstvalue, and the second value. The first range and the second range can beencoded as the first range code and the second range code using aHuffman code, or the first value and the second value can be encoded asthe first value code and the second value code using a Golomb code. Thetransforming the image data can be performed using a 16×16 discretecosine transform.

While certain embodiments are described with respect to specificresolutions (for example, at least 2k or at least 4k) or frame rates(for example, at least 23 frames per second), such embodiments are notlimited to those frame rates or resolution levels. For instance,depending on the embodiment (for example, depending on sensor size) thetechniques for on-board storage of compressed raw image data describedherein can be capable of achieving resolution levels of at least 2k, 3k,4k, 4.5k, 5k, 6k, 8k, 10k, 12k, 15k, 20k, or greater resolution levels,or resolution levels between and inclusive of any of the foregoingresolution levels (for example, between and inclusive of 4k and 12k).Similarly, depending on the embodiment, the techniques for on-boardstorage of compressed raw image data described herein can be capable ofcapturing or storing image data at frame rates of at least 23, 24, 25,120, 150, or 240 or greater fps, or of frame rates between and inclusiveof any of the foregoing resolution levels (for example, between andinclusive of 23 fps and 120 fps).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A illustrates a top, front, and left-side perspective view of anexample phone.

FIG. 1B illustrates a bottom, rear, and right-side perspective view ofthe phone of FIG. 1A.

FIG. 1C illustrates a side view of the phone of FIG. 1A positioned forattachment to an example camera module.

FIG. 1D illustrates a perspective view of the phone of FIG. 1A and thecamera module of FIG. 1C when attached.

FIG. 2 illustrates a perspective view of an example video camera.

FIGS. 3A and 3B illustrate components of an example image capturedevice, such as the phone of FIG. 1A, the camera module of FIG. 1C, orthe video camera of FIG. 2.

FIG. 4 illustrates an example process for processing image data that isperformable by an image capture device, such as the image capture deviceof FIG. 3A.

FIG. 5 is a plot illustrating an example pre-emphasis function.

FIG. 6 illustrates an example process for compressing video image datathat is performable by an image capture device, such as the imagecapture device of FIG. 3A.

FIG. 7 illustrates the image capture device of FIG. 3A in communicationwith an example phone, such as the phone of FIG. 1A.

FIG. 8 illustrates example components of the phone of FIG. 1A or thecamera module of FIG. 1C.

FIG. 9A illustrates a perspective view of the phone of FIG. 1Apositioned for attachment to an expander module and the camera module ofFIG. 1C.

FIG. 9B illustrates a perspective view of the phone of FIG. 1A, theexpander module of FIG. 9A, and the camera module of FIG. 1C whenattached.

DETAILED DESCRIPTION I. Introduction

This disclosure describes, among other features, approaches forcompressing video image data, such as raw Bayer data. The approachesdesirably can, in certain embodiments, enable compression of the videoimage data using several lines of on-chip memory and without using aframe memory like DRAM. The compressed size of the video image data canbe set and targeted for individual frames and adapted fromframe-to-frame. Moreover, the approaches can provide a hardware-friendlyimplementation that enables a reduction in size and power consumptionfor devices which compress video image data. As a result, certainfeatures of this disclosure can be particularly desirable for relativelysmaller or low-power handheld devices, such as smart phones, where itmay be desirable to save high quality video while limiting powerconsumption and system size. In some embodiments, such techniques can beused to compress fully-processed YUV data rather than raw.

Although the electronic devices described herein may be primarilydescribed in the context of a smart phone, the disclosures areapplicable to any of a variety of electronic devices with or withoutcellphone functionality, including digital still and motion cameras,personal navigation devices, mobile internet devices, handheld gameconsoles, or devices having any or a combination of the functions orother functions.

II. Electronic Device System Overview

FIG. 1A illustrates a top, front, and left-side perspective view of aphone 10 that may implement one or more of the compression techniques orother features described herein. The phone 10 can be a smart phone. Thefront of the phone 10 includes a display 11, cameras 12 (for instance,four cameras as illustrated), a first speaker grill 13A, and secondspeaker grills 13B, as well as one or more microphones (not shown). Theleft side of the phone 10 includes a first input 14.

FIG. 1B illustrates a bottom, rear, and right-side perspective view ofthe phone 10. The bottom of the phone includes a power input port 15.The left side of the phone 10 includes second inputs 16. The back of thephone 10 includes second cameras 17 (for instance, two cameras asillustrated), a flash 18, a laser focus 19, and a module connector 20.

The display 11 can display a variety of applications, functions, andinformation and may also incorporate touch screen control features.

Each of the first cameras 12 and the second cameras 17 includes acapability for capturing video image data frames with various oradjustable resolutions and aspect ratios as described herein. The firstcameras 12 can each generally face the same direction as one another,and the second cameras 17 can generally face the same direction as oneanother.

The first input 14 and the second inputs 16 can be buttons and receiveuser inputs from a user of the phone 10. The first input 14 can, forexample, function as a power button for the phone 10 and enable the userto control whether the phone 10 is turned on or off. Moreover, the firstinput 14 may serve as a user identification sensor, such as a fingerprint sensor, that enables the phone 10 to determine whether the user isauthorized to access the phone 10 or one or more features of or filesstored on the phone 10 or a device coupled to the phone 10. The firstinput 14 can function as a device lock/unlock button, a button toinitiate taking of a picture, a button to initiate taking of a video, orselect button for the phone 10. The second inputs 16 can function as avolume up button and a volume down button for the phone 10. Thefunctionality of the first input 14 and the second inputs 16 can beconfigured and varied by the user. Moreover, the side of the phone 10can include scalloped or serrated edges as illustrated in FIG. 1A and asdescribed in U.S. Pat. No. 9,917,935; the entire disclosure of which isincorporated herein by reference. Notably, the scallop in which thefirst input 14 is positioned may not include serrations while the otherscallops may include serrations, which can assist a user withdistinguishing the two edges of the phone 10 from one another, as wellas the first input 14 from the second inputs 16.

The phone 10 may receive no user inputs to the front of the phone 10except via the display 11, in some embodiments. The front of the phone10 thus may include no buttons, and any buttons may be located on one ormore sides of the phone 10. Advantageously, such a configuration can, incertain embodiments, improve the ergonomics of the phone 10 (such as byenabling a user to not have to reach down to a front button) andincrease an amount of space available for the display 11 on the phone10.

The module connector 20 can interchangeably couple with a module andreceive power or data from or transmit power or data to the module orone or more other devices coupled to the module. The module can includea camera, a display, a video game controller, a speaker, a battery, aninput/output expander, a light, a lens, a projector, and combinations ofthe same and the like. The module moreover may be stacked to one or moreother module to form a series of connected modules coupled to the phone10, such as described in U.S. Patent Application Publication No.2017/0171371; the entire disclosure of which is incorporated herein byreference.

The module connector 20 can include multiple contacts (for instance, 44contacts in three rows or 13 contacts in one row, among otherpossibilities) that engage with contacts on a corresponding connector ofa module to electronically communicate data. The multiple contacts canengage with a spring loaded connector or contacts of the module. In someimplementations, the phone 10 can magnetically attach to or support themodule, and the phone 10 and the module can each include magnets thatcause the phone 10 to be attracted and securely couple. The phone 10 andthe module can further be coupled in part via a friction fit,interlocking structures, fasteners, mechanical snap surface structures,mechanical latch surface structures, mechanical interference fit surfacestructures, or the like between one or more portions of the phone 10 andone or more portions of the module.

Additional information about coupling of and communicating data betweena device and one or more modules can be found in U.S. Patent App. Pub.Nos. 2017/0171371 and 2016/0044148 and U.S. Pat. No. 9,568,808; thedisclosures of which are herein incorporated by reference in theirentirety.

The dimensions of the phone 10 can vary depending on the particularembodiment. For example, the phone 10 can be approximately 100 mm highby 50 mm wide by 15 mm thick. In another example, the phone 10 can beabout 150 mm in height, 70 mm wide and 10 mm thick. In yet anotherexample, the phone 10 can be about 130 mm high, by 70 mm wide by 10 mmthick. In yet a further example, the phone 10 can be approximately 120mm high by 60 mm wide by 10 mm thick. The display 11, for instance, canbe a 4″, 4.5″, 5″, 5.5″, 5.7″, 6″, 6.5″, 7″, or 7.5″ display.

FIG. 1C illustrates a side view of the phone 10 positioned forattachment to a camera module 30, and FIG. 1D illustrates a perspectiveview of the phone 10 and the camera module 30 when attached. The cameramodule 30, alone or in combination with the phone 10, can implement oneor more of the compression techniques or other features describedherein. The camera module 30 can include a housing that supports magnets34A and 34B and an input 36. The magnets 34A and 34C can facilitatecoupling of the housing to the phone 10. The input 36 can be used toreceive user inputs to the camera module 30 to control activities of thecamera module 30 like changing of a mode or initiating capture of video.Although not illustrated in FIGS. 1C and 1D, the camera module 30 canalso include magnets on an opposite side of the housing of the cameramodule 30 from the side shown in FIG. 1C to couple the opposite side tothe housing of the phone 10.

The camera module 30 can further couple to an optical module 38 that maybe interchangeable with one or more other optical modules. The opticalmodule 38 can, for example, include one or more optical elements such aslenses, shutters, prisms, mirrors, irises, or the like to form an imageof an object at a targeted location. Embodiments of camera modules andoptical modules and approaches for coupling the camera modules andoptical modules are further described in U.S. Patent ApplicationPublication No. 2017/0171371; the entire disclosure of which isincorporated herein by reference.

The optical module 38 can include a removable lens 39 and a lens mount41, where the lens 39 may be inserted into an opening (not shown) of thelens mount 41, and then rotated to secure the lens in place. In oneembodiment, the lens mount 41 can include a button or other type ofcontrol, allowing for removal of the lens 39. For instance, the user canpush or otherwise interact with an interface element which allows theuser to rotate the lens 39 in the opposite direction and remove the lens39 from the opening of the lens mount 41. In some embodiments, the lensmount 41 itself is removable and re-attachable via holes 45A, 45B, 45C,45D, for example, by inserting a mounting screw through each hole. Thelens mount 41 or the lens 39 can, for example, be one of those describedin U.S. Pat. No. 9,568,808, which is hereby incorporated by reference inits entirety.

The camera module 30 can include a module connector 31, similar to orthe same as the module connector 20, that can interchangeably couplewith an additional module (for example, engage with contacts on acorresponding connector of the additional module) and receive power ordata from or transmit power or data to the module or one or more otherdevices coupled to the module. The additional module can include acamera, a display, a video game controller, a speaker, a battery, aninput/output expander, a light, a lens, a projector, or combinations ofthe same and the like. In one example, the additional module connectedto the module connector 31 can be an input/output expander and includeone or more additional inputs that enable a user to control operationsof the camera module 30. The additional module moreover may have a formfactor that permits coupling of a corresponding connector of theadditional module to the module connector 31 without the additionalmodule impeding placement or use of the lens mount 41 or obstructing aview through the lens 39 from an image sensor in the camera module 30(for example, the additional module may not cover the entire surface ofthe camera module 30 that includes the module connector 31). In someimplementations, the additional module can magnetically attach to or besupported by the camera module, and the additional module and the cameramodule 30 can each include magnets that cause the two to be attractedand securely couple. Additionally or alternatively, coupling can beachieved at least via a friction fit, interlocking structures,fasteners, mechanical snap surface structures, mechanical latch surfacestructures, mechanical interference fit surface structures, or the like.

FIG. 2 illustrates a perspective view of a video camera 40. The videocamera 40 can include a brain module 42, a lens mount module interface44, and a lens 46. The video camera 40 can implement one or more of thecompression techniques or other features described herein. Embodimentsof the video camera 40 and its components are described in greaterdetail in in U.S. Patent Application Publication Nos. 2016/0295096 and2017/0171371; the entire disclosures of which are incorporated herein byreference.

FIG. 3A illustrates an image capture device 50 that can implement one ormore of the compression techniques or other features described herein.The image capture device 50, in some embodiments, can be or incorporatedas part of the phone 10, the camera module 30, or the video camera 40.The image capture device 50 can include a housing configured to supportoptics 51, an image sensor 52 (or multiple image sensors), an imageprocessing system 53, a compression system 54, and a memory device 55.In some implementations, the image capture device 50 can further includea multimedia system 56. The image sensor 52, the image processing system53, the compression system 54, and the multimedia system 56 may becontained within the housing during operation of the image capturedevice 50. The memory device 55 can be also contained or mounted withinthe housing, mounted external to the housing, or connected by wired orwireless communication external to the image capture device 50.

The optics 51 can be in the form of a lens system having at least onelens configured to focus an incoming image onto the image sensor 52. Insome embodiments, the optics 51 can be in the form of a multi-lenssystem providing variable zoom, aperture, and focus. The optics 51 canbe in the form of a lens socket supported by the housing and receivemultiple different types of lens systems for example, but withoutlimitation, the optics 51 can include a socket configured to receivevarious sizes of lens systems including a 50-100 millimeter (F2.8) zoomlens, an 18-50 millimeter (F2.8) zoom lens, a 300 millimeter (F2.8)lens, 15 millimeter (F2.8) lens, 25 millimeter (F1.9) lens, 35millimeter (F1.9) lens, 50 millimeter (F1.9) lens, 85 millimeter (F1.9)lens, or any other lens. As noted above, the optics 51 can be configuredsuch that images can be focused upon a light-sensitive surface of theimage sensor 52 despite which lens is attached thereto. Additionalinformation regarding such a lens system can be found in U.S. Pat. No.9,568,808, the entire disclosure of which is herein incorporated byreference.

The image sensor 52 can be any type of video sensing device, including,for example, but without limitation, CCD, CMOS, vertically-stacked CMOSdevices such as the Foveon® sensor, or a multi-sensor array using aprism to divide light between the sensors. The image sensor 52 canfurther include a color filter array such as a Bayer pattern filter thatoutputs data representing magnitudes of red, green, or blue lightdetected by individual photocells of the image sensor 52. In someembodiments, the image sensor 52 can include a CMOS device having about12 million photocells. However, other size sensors can also be used. Insome configurations, video camera 10 can be configured to output videoat “2k” (e.g., 2048×1152 pixels), “4k” (e.g., 4,096×2,540 pixels),“4.5k,” “5k,” “6k,” “8k”, or “16k” or greater resolutions. As usedherein, in the terms expressed in the format of “xk” (such as “2k” and“4k” noted above), the “x” quantity refers to the approximate horizontalresolution. As such, “4k” resolution corresponds to about 4000 or morehorizontal pixels and “2k” corresponds to about 2000 or more pixels.Using currently commercially available hardware, the image sensor 52 canbe as small as about 0.5 inches (8 mm), but it can be about 1.0 inches,or larger. Additionally, the image sensor 52 can provide variableresolution by selectively outputting only a predetermined portion of theimage sensor 52. For example, the image sensor 52 or the imageprocessing system 53 can be configured to allow a user to identify,configure, select, or define the resolution of the video data output.Additional information regarding sensors and outputs from sensors can befound in U.S. Pat. No. 8,174,560, the entire disclosure of which isherein incorporated by reference.

The image processing system 53 can format the data stream from the imagesensor 52. The image processing system 53, for instance, can separatethe green, red, and blue image data into three or four separate datacompilations. For example, the image processing system 53 can beconfigured to separate the red data into one red channel or datastructure, the blue data into one blue channel or data structure, andthe green data into one green channel or data structure. The imageprocessing system 53 may also separate the green into two separate greendata structures in order to preserve the disparity between thediagonally adjacent green pixels in a 2×2 Bayer pattern. The imageprocessing system 53 can process the picture element values to combine,subtract, multiply, divide, or otherwise modify the picture elements togenerate a digital representation of the image data.

The image processing system 53 can further include a subsampling systemconfigured to output reduced or unreduced resolution image data tomultimedia system 56. For example, such a subsampling system can beconfigured to output image data to support 6K, 4K, 2K, 1080p, 720p, orany other resolution. Additionally, the image processing system 53 caninclude other modules or perform other processes, such as gammacorrection processes, noise filtering processes, and the like. Examplesof functionality provided by the image processing system 53 aredescribed in U.S. Patent Application Pub. No. 2014/0226036, which isincorporated herein by reference in its entirety.

The compression system 54 can compress the image data from the imageprocessing system 53 using a compression technique, such as thecompression approach described with respect to FIG. 7, or anothertechnique. The compression system 54 can be in the form of a separatechip or chips (for example, FPGA, ASIC, etc.). The compression system 54can be implemented with software and another processor or can beimplemented with a combination of processors, software, or dedicatedchips. For example, the compression system 54 can include one or morecompression chips that perform a compression technique in accordancewith DCT-based codecs.

The compression system 54 can compress the image data from the imageprocessing system 53 using DCT-based codecs with rate control. In someembodiments, the compression system 54 performs a compression techniquethat modifies or updates compression parameters during compression ofvideo data. The modified or updated compression parameters can beconfigured to achieve targeted or desired file sizes, video quality,video bit rates, or any combination of these. In some embodiments, thecompression system 54 can be configured to allow a user or other systemto adjust compression parameters to modify the quality or size of thecompressed video output by the compression system 54. For example, theimage capture device 50 can include a user interface (not shown) thatallows a user to input commands that cause the compression system 54 tochange compression parameters.

The compression system 54 can compress the image data from the imageprocessing system 53 in real time. The compression system 54 can performcompression using a single-pass to compress video frames. This can beused to eliminate the use of an intermediate frame memory used in somecompression systems to perform multiple compression passes or tocompress a current video frame based on the content from one or moreprevious video frames stored in an intermediate frame memory. This canreduce the cost or complexity of a video camera with on-board videocompression. The compression system 54 can compress image data from theimage processing system 53 in real time when the frame rate of the imagedata is at least 23 frames per second (fps), at least about 24 fps(e.g., 23.976 fps), at least about 25 fps, at least about 30 fps (e.g.,29.97 fps), at least about 48 fps, at least about 50 fps, at least about60 fps (e.g., 59.94 fps), at least about 120 fps, at least about 240fps, or less than or equal to about 240 fps. The compressed video canthen be sent to the memory device 55.

The memory device 55 can be in the form of any type of digital storage,such as, for example, but without limitation, hard disks, flash memory,or any other type of memory. In some embodiments, the size of the memorydevice 55 can be sufficiently large to store image data from thecompression system 54 corresponding to at least about 30 minutes ofvideo at 12 megapixel resolution, 12-bit color resolution, and at 60fps. However, the memory device 55 can have any size.

In embodiments that include the multimedia system 56, the multimediasystem 56 can allow a user to view video images captured by the imagesensor 52 during operation or video images received from the compressionsystem 54 or the memory device 55. In some implementations, the imageprocessing system 53 can include a subsampling system configured tooutput reduced resolution image data to the monitor system 56. Forexample, such a subsampling system can be configured to output videoimage data to support “2k,” 1080p, 720p, or any other resolution.Filters used for de-mosaicing can also be adapted to performdown-sampling filtering, such that down-sampling and filtering can beperformed at the same time. The multimedia system 56 can perform anytype of decompression or de-mosaicing process to the data from the imageprocessing system 53. For example, the multimedia system 56 candecompress data that has been compressed as described herein.Thereafter, the multimedia system 56 can output a de-mosaiced ordecompressed image data to a display of the multimedia system 56 oranother display.

FIG. 3B illustrates additional components of the image capture device 50according to some embodiments. FIG. 3B, in particular, depicts moreimplementation details of an embodiment of the image capture device 50than FIG. 3A. As illustrated, the image capture device 50 is further incommunication with frame memory 63. The frame memory 63 can be DRAM,such as the RAM 113 of FIG. 4.

The image capture device 50 further includes an image processing unit60. As shown, the image processing unit 60 can include the imageprocessing system 53, the compression system 54, and on-chip memory 62.The on-chip memory can, for example, be SRAM. Some or all of thecomponents of the image processing unit 60 can be dedicated to use forprocessing and storage of image data (for example, compressed raw videoimage data) captured by the image capture device 50, and may not be usedfor other purposes, such as for implementing telephone functionalityassociated with the image capture device 50.

The image processing unit 60 can include one or more integratedcircuits, chips or chipsets which, depending on the implementation, caninclude an application specific integrated circuit (ASIC), a fieldprogrammable gate array (FPGA), a combination thereof, or the like.According to certain embodiments, the on-chip memory 62 can be locatedwithin the same device (for example, ASIC, FPGA, or other chip[s]) asother components of the image processing unit 60, such as the imageprocessing system 23 and compression system 54. For instance, the imageprocessing unit 60 can include an ASIC or FPGA which implements theimage processing system 53, the compression system 54, and the on-chipmemory 62. The on-chip memory 62 can therefore be referred to as an“on-chip” memory according to certain embodiments, whereas the framememory 63 can be referred to as an “off-chip” memory.

As shown, the frame memory 63 can be implemented separate from the imageprocessing unit 60 and can be a DRAM. For instance, in one embodiment,the frame memory 63 and image processing unit 60 are respectively anASIC and FPGA implemented in separate packages and mounted on a commonprinted circuit board. The frame memory 63 can be used to concurrentlystore an entire image frame (for example, all or substantially all ofthe pixel data of one image frame) for processing purposes. Forinstance, the frame memory 63 can be used by the image processing system53 for storing entire image frames during certain image processingsteps, such as pixel defect correction or pixel pattern noise correctionas a couple of examples. While the frame memory 63 may be used for somesuch steps, according to certain embodiments, the image capture device50 implements an image processing pipeline in which compressed raw videoimage data is processed without utilizing the frame memory 63 for thepurposes of compression. For instance, the compression system 54 in someembodiments implements a DCT-based compression scheme, which can be anyof those described herein, such as with respect to FIG. 6. Such aDCT-based compression scheme can be relatively lightweight in memoryrequirements, such that the compression system 61 can perform thecompression utilizing the on-chip memory 62 and not the frame memory 63or any other frame memory during compression.

Avoiding use of frame memory during compression can significantly reducepower consumption, and contrasts with certain other compressiontechniques which involve the use of a frame memory for motion vectorcalculations. For instance, according to certain DCT-based compressiontechniques described herein, the compression system 54 operates on adiscrete section of a video image frame (for example, a section smallerthan a full image frame) at any given time, discards the discretesection of the video image frame immediately after processing. Forinstance, in one embodiment, the compression system 54 operates on datafor 32 horizontal lines of pixels at a time, and only utilizes an amountof storage in the on-chip memory 62 corresponding to 64 lines of pixeldata for compression purposes (to hold image data for 32 lines of pixeldata currently being compressed and to hold image data for the next 32lines to be compressed). Depending on the embodiment, power consumptioncan be reduced such that, according to various embodiments the imagecapture device 50 consumes less than about 15 or 20 W during operation,and in some embodiments consumes between about 10 W to 20 W, betweenabout 10 W to 25 W, or between about 5 W to 25 W. For instance,according to some embodiments the imaging componentry of the imageprocessing device 50 (for example, the camera-related componentry of theimage processing device 50) consumes less than about 10 W or 15 W (forexample, between about 4 W to 10 W or between about 6 W 10 W), whereasthe remaining non-imaging componentry (for example, phone componentry,display componentry, etc.) consumes less than about 10 W (for example,between about 3 W to 10 W or between about 5 W 10 W).

The compression techniques described herein can allow for enhanceddecoding/decompression speeds. For instance, the DCT-based rawcompression techniques can allow for enhanced decompression because DCTalgorithms allow for use of highly parallelized mathematical operationsduring decompression, making efficient use of graphics processing units.Depending on the embodiment, the raw compression techniques describedherein can allow for decompression of video image frames in less than orequal to about 1/23, 1/24, 1/25, or 1/120 seconds, which can allow forreal-time decompression, depending on the frame rate.

III. Image Data Processing

FIG. 4 is a flowchart 400 illustrating an example process for processingvideo image data that is performable by an image capture device, such asthe phone 10, the camera module 30, the video camera 40, or the imagecapture device 50. The flowchart 400 can represent a control routinestored in a memory device, such as the memory device 55, the ROM 112,RAM 113, or memory 175. Additionally, a processor, such as thecontroller 110, can be configured to execute the control routine. Forconvenience, the flowchart 400 is described in the context of the imagecapture device 50 but may instead be implemented by other systemsdescribed herein or other appropriate computing systems not shown. Theflowchart 400 advantageously, in certain embodiments, depicts an exampleapproach by which a relatively small or low-power handheld device like acellphone can process video image data.

At block 402, the image sensor 52 can generate video image dataresponsive to light incident on the image sensor 52. For example, theimage sensor 52 can generate the video image data as raw mosaiced imagedata at least at about 23 frames per second and with a resolution of atleast 2K. Moreover, the output from the one or more image sensors 202can in some implementations each be at least 16-bit wide with 15-bitoutputs and 1 bit set for black sun effect. The image sensor 52 can, insome instances, be used to generate 3D video image data for processingand eventual presentation as 3D video images.

At block 404, the image processing system 53 can pre-emphasize the videoimage data generated by the image sensor 52. The generated video imagedata can be pre-emphasized by performing a lossy transform to raw pixelsof the generated video image data. The pre-emphasis can desirably, incertain embodiments, reduce an amount of video image data to beprocessed at block 406 while nonetheless preserving video image dataquality.

The image processing system 53 can, for example, perform a piecewiselinear function to that transforms the raw pixels from 15-bit or 16-bitdata to 12-bit data. The slope of the piecewise linear function canfollow a harmonic progression 1, ½, ⅓, . . . , 1/15, 1/16 and changeevery 256 counts. The shape of the piecewise linear function can betailored to the image sensor 52 from sensor characterization data andthus vary from sensor to sensor or sensor manufacturer to sensormanufacturer. The input range of the piecewise linear function may, insome instances, go above a maximum value permitted to account for ablack offset that may be applied.

FIG. 5 is a plot 500 that graphically illustrates one example piecewiselinear function for transforming raw pixels from 15-bit data to 12-bitdata. Table 1 below provides example points along the plot 500.

TABLE 1 15-bit input 12-bit output 0 0 256 256 768 512 1536 768 25601024 3840 1280 5376 1536 7168 1792 9216 2048 11520 2304 14080 2560 168962816 19968 3072 23296 3328 26880 3584 30720 3840 34800 4095

The pre-emphasis can be performed by the image processing system 53given the understanding that not all video image data values in a bitrange (such as a 15-bit range including 0-32767) carry the sameinformation. Incoming light at each pixel can be governed by a Poissonprocess that results in a different photon shot noise (PSN) at eachlight level. The Poisson random distribution can have a uniquecharacteristic where a variance of a distribution is equal to a mean ofthe distribution. Thereby, the standard deviation is equal to the squareroot of the mean. From this understanding, the uncertainty (such asindicated by the standard deviation) associated with each measureddigital number output (DN), corresponding to incoming light for aparticular pixel, can be proportional to √{square root over (DN)}. Topre-emphasize, one or more digital values in an input domain can belumped to a single digital value in an output domain. If Q adjacent DNvalues are lumped together (for instance, quantized) into one, theresulting noise can be proportional to √{square root over (Q³)}. Thequantization noise can be minimized by choosing Q such that √{squareroot over (DN)} α √{square root over (Q³)} (for example, Qα³√{squareroot over (DN)}). The complexity of this function can be reduced byconstructing a piecewise linear function from the function. Using thistechnique, additional noise added by the pre-emphasis can be reduced,such as to a small percentage (like 1% of the photon shot noise in anexample worst case scenario).

A conversion function may be used to convert pre-emphasized values afterdecoding. For example, the following function, which is expressed inpseudocode, can be used to convert 12-bit data back to 15-bit data afterdecoding.

int index=imageData[i][j]>>8;

int offset=imageData[i][j]& 0xff;

int value=(index+1)*offset+((index+1)*index*128)+((index+1)>>1);

In some instances, using a conversion function (sometimes referred to asa pre-emphasis function) that has a relatively simple inverse canhelpful for decoding compressed image in hardware using parallelprocessing. For example, when an example conversion function has arelatively simple inverse, a Graphical Processing Unit (GPU) may be usedto relatively quickly convert 12-bit data back to its original 15-bitdata form after decompression.

Additional information regarding pre-emphasis techniques can be found inU.S. Pat. No. 8,174,560, the entire disclosure of which is hereinincorporated by reference.

At block 406, the compression system 54 can compress the video imagedata pre-emphasized by the image processing system 53. For example, thecompression system 54 can compress the pre-emphasized video image dataas described with respect to FIG. 6 or using another compressionalgorithm. The compression system 54 can, in some implementations,perform one or more of the following: (i) compress the video image datawithout using a frame memory that stores a full image frame, (ii)compress the video image data using one memory device and without usingany memory positioned off-chip relative to the one memory device, (iii)compress the video image data using a static memory that may not beperiodically refreshed rather than a dynamic memory that must beperiodically refreshed, and (iv) operate according to the timing of aclock and correctly compress the video image data despite the clockstopping for a period of time such as a 5, 10, 20, or 30 seconds or 1,2, 3, 5, or 10 minutes. The compression system 54 moreover can be usedto compress video image data that is presentable as 3D video images.

FIG. 6 is a flowchart 600 illustrating an example process forcompressing video image data that is performable by an image capturedevice, such as the phone 10, the camera module 30, the video camera 40,or the image capture device 50. The flowchart 600 can represent acontrol routine stored in a memory device, such as the memory device 55,the ROM 112, RAM 113, or memory 175. Additionally, a processor, such asthe controller 110, can be configured to execute the control routine.For convenience, the flowchart 600 is described in the context of theimage capture device 50 but may instead be implemented by other systemsdescribed herein or other appropriate computing systems not shown. Theflowchart 600 advantageously, in certain embodiments, depicts an exampleapproach by which a relatively small or low-power handheld device like acellphone can compress video image data.

At block 602, the compression system 54 can shift and divide video imagedata. Values of the video image data can be shifted by an amount equalto a central value for the video image data that depends on a number ofbits of the data (for instance, the central value can be 0.5·2^(n) forn-bit data, which means 2048 in the case of 12-bit data). The shiftingcan shift the values around a value of 0 for further processing. Thevalues can also be divided into slices and macroblocks. In oneimplementation, a maximum size of the slice is 256×32 pixels, andmaximum size slices are packed from left to right. If some pixels arestill left on the end of each line, a slice of size 256×32 pixels,128×32 pixels, 64×32 pixels, 32×32 pixels, or another size can be madeby packing pixels of value 0 at the end. In instances where the pixelsfollow a Bayer pattern, each slice can have 128×16 Green1, Green2, Red,and Blue pixels, and the pixels can be further divided into 8macroblocks (16×16 pixels) of Green1, Green2, Red, and Blue pixels.

At block 604, the compression system 54 can transform the shifted anddivided video image data, such as using a discrete cosine transform(DCT) or another transform. In one example, the compression system 54can transform each macroblock of the shifted and divided video imagedata using a 16×16 DCT. The 16×16 DCT notably can provide, in someinstances, higher compression efficiency than an 8×8 DCT. The twodimensional 16×16 DCT can moreover be separable into 32 one dimensional1×16 DCT calculations. This separability advantageously can, in certainembodiments, facilitate the use of memory having a capacity less than aframe memory (for example, multiple lines of on-chip memory 62) whenperforming compression. The output from the transformation can betransform coefficients for the video image data.

At block 606, the compression system 54 can quantize the transformcoefficients. The quantization can include two components. The firstcomponent can be a quantization table value from one or morequantization tables. For example, one quantization table can be used forGreen1 and Green2 channels, and another quantization table can be usedfor blue and red channels. The one or more quantization tables can bedefined in a frame header. The second component can be a quantizationscale factor. The quantization scale factor can be the same for eachvalue within a slice, vary from a minimum value (for example, 1) to amaximum value (for example, 255), be defined in a slice header, and usedfor achieving a target slice size. The quantization scale factor can bedetermined based at least on a target frame size or a technique such asis described in U.S. Pat. No. 9,800,875, which is herein incorporated byreference in its entirety. The quantization scale factor may be setconstant in some instances to generate a compressed video of certainquality irrespective of the compressed image size. In oneimplementation, the quantized values for the transform coefficients canbe determined using Equation 1 below.

$\begin{matrix}{{{Quantized}\mspace{14mu}{Value}} = \frac{{Transformed}\mspace{14mu}{Coefficient}\mspace{14mu}{Value}}{\begin{matrix}{{Quantization}\mspace{14mu}{Table}\mspace{14mu}{Value}*} \\{{Quantization}\mspace{14mu}{Scale}\mspace{14mu}{Factor}}\end{matrix}}} & {{Equation}\mspace{14mu} 1}\end{matrix}$

At block 608, the compression system 54 can arrange the quantizedtransform coefficients slice-by-slice for encoding and so that green,red, and blue components may be encoded separately within a slice. TheDC coefficients of the macroblocks of one slice can be arranged left toright. The AC coefficients of the macroblocks of the one slice canarranged so that (i) all particular location AC coefficients in a 16×16DCT table from different macroblocks in the slice are arranged one afterthe other and (ii) the different AC coefficients are arranged by thezig-zag scan order illustrated by Table 2 below where the index in Table2 indicates a position in the sequence for the quantized transformcoefficients.

TABLE 2 0 1 5 6 14 15 27 28 44 45 65 66 90 91 119 120 2 4 7 13 16 26 2943 46 64 67 89 92 118 121 150 3 8 12 17 25 30 42 47 63 68 88 93 117 122149 151 9 11 18 24 31 41 48 62 69 87 94 116 123 148 152 177 10 19 23 3240 49 61 70 86 95 115 124 147 153 176 178 20 22 33 39 50 60 71 85 96 114125 146 154 175 179 200 21 34 38 51 59 72 84 97 113 126 145 155 174 180199 201 35 37 52 58 73 83 98 112 127 144 156 173 181 198 202 219 36 5357 74 82 99 111 128 143 157 172 182 197 203 218 220 54 56 75 81 100 110129 142 158 171 183 196 204 217 221 234 55 76 80 101 109 130 141 159 170184 195 205 216 222 233 235 77 79 102 108 131 140 160 169 185 194 206215 223 232 236 245 78 103 107 132 139 161 168 186 193 207 214 224 231237 244 246 104 106 133 138 162 167 187 192 208 213 225 230 238 243 247252 105 134 137 163 166 188 191 209 212 226 229 239 242 248 251 253 135136 164 165 189 190 210 211 227 228 240 241 249 250 254 255

At block 610, the compression system 54 can divide the arrangedtransform coefficients into ranges and values within ranges. The rangesfor the DC coefficients can be ranges of possible values of the DCcoefficients, and the ranges for the AC coefficients can be ranges ofpossible values of the AC coefficients and counts of groupings of 0values.

At block 612, the compression system 54 can encode the ranges of thearranged coefficients as Huffman codes and at least some of the valueswithin the ranges of the arranged coefficients as Golomb codes. If arange has no more than one unique value, the one unique value may beencoded with a Huffman code and not a Golomb code. If a range has morethan one unique value, values can be encoded by a combination of aHuffman code for the range and a Golomb code for the unique value withinthe range. The ranges and the Golomb codes for the ranges may be fixedor predefined, such as set at manufacture. The Huffman codes for theranges, however, can vary from frame to frame with one or more Huffmantables being defined in a frame header. An encoder can use theadaptability of Huffman coding and may compute one or more Huffmantables at the end of each frame to be used for a next frame to optimizecompression efficiency for particular video image data. In oneimplementation, a maximum number of bits in a Huffman code can be 12.

The value of a DC coefficient of a particular component in a slice maybe encoded as a difference from the previous value of the DCcoefficient. This difference can be termed a difference coefficient. Aninitial value for the DC coefficient for the particular component in theslice can be set to 0. To encode the values of individual DCcoefficients, the compression system 54, for example, can (i) calculatethe absolute value of the difference coefficient for the individual DCcoefficient, (ii) append the Huffman code corresponding to the range ofthe individual DC coefficient to the bit stream, (iii) append the Golombcode corresponding to the value within the range of the individual DCcoefficient to the bit stream, and (iv) append a sign bit (for example,0 for positive and 1 for negative) to the bitstream if differencecoefficient is nonzero.

Table 3 below provides an example DC encoding table. The Huffman codeportion of the table can be used as a default table at the beginning ofcompression when compression statistics may be unknown.

TABLE 3 Example DC Huffman Table Huffman Huffman |DC Value| Code BitsGolomb Code  0-15 0 1 Golomb-Rice(|DC Value|, 2) 16-31 11 2Golomb-Rice(|DC Value|−16, 2) 32-63 010 3 Golomb-Rice(|DC Value|−32, 3) 64-127 011 3 Golomb-Rice(|DC Value|−64, 4) 128-255 100 3Golomb-Rice(|DC Value|−128, 5) 256-511 1010 4 Golomb-Rice(|DCValue|−256, 6) 512-inf  1011 4 ExpGolomb(|DC Value|−512, 7)

For example, as can be seen from Table 3, if the difference coefficientmay be 20, the Huffman code can be 11, the Huffman bits can be 2, theGolomb code can be Golomb-Rice(4, 2), and the sign bit can be 0. Asanother example, if the difference coefficient may be −75, the Huffmancode can be 011, the Huffman bits can be 3, the Golomb code can beGolomb-Rice(11, 4), and the sign bit can be 1. As yet another example,if the difference coefficient may be 300, the Huffman code can be 1010,the Huffman bits can be 4, the Golomb code can be Golomb-Rice(44, 6),and the sign bit can be 0.

The values of AC coefficients can be represented by runs of zerosfollowed by a non-zero value. Different Huffman codes can denote thevalues of AC coefficients that are preceded by runs of zeros and thosethat are not preceded by runs of zeros. To encode the values of non-zeroindividual AC coefficients, the compression system 54, for example, can(i) calculate EACV=|AC valued|−1 for the individual AC coefficient, (ii)determine whether the individual AC coefficient is preceded by one ormore zeros, (iii) append the Huffman code corresponding to the EACV forthe individual DC coefficient to the bit stream, (iv) append the Golombcode corresponding to the EACV to the bit stream if EACV exceeds 3, and(v) append a sign bit (for example, 0 for positive and 1 for negative)to the bitstream. Moreover, to encode the values of individual ACcoefficients that have values of zero, the compression system 54, forexample, can (i) calculate EACR=AC runs of zeros−1, (ii) append theHuffman code corresponding to the EACR to the bit stream, and (iii)append the Golomb code corresponding to the EACR to the bit stream ifEACR exceeds 3.

Table 4 below provides an example AC encoding table. The Huffman codeportion of the table can be used as a default table at the beginning ofcompression when compression statistics may be unknown.

TABLE 4 Example AC Huffman Table AC Value after zero AC Run AC Valueafter non-zero AC Run AC Run Length |AC Huffman Huffman |AC HuffmanHuffman AC Huffman Huffman Value| −1 Code Bits Value| −1 Code Bits Run−1 Code Bits Golomb Code 0 01 2 0 10 2 0 1 1 1 110 3 1 1111 4 1 001 3 20010 4 2 000011 6 2 0100 4 3 00000 5 3 0011000 7 3 0101 4 4-7 0001 4 4-7001101 6 4-7 011 3 Golomb-Rice(|AC Value|−4, 0)  8-15 1110 4  8-150011001 7  8-15 0001 4 Golomb-Rice(|AC Value|−8, 1) 16-31 00111 5 16-31000010110 9 16-31 00001 5 Golomb-Rice(|AC Value|−16, 2 32-63 0000100 732-63 0000101110 10 32-63 000000 6 Golomb-Rice(|AC Value|−32, 3  64-inf00001010 8  64-inf 0000101111 10  64-inf 000001 6 ExpGolomb(|ACValue|−64, 4)

To illustrate how Table 4 may be used for encoding, an example ofencoding the eleven coefficient sequence of 0, 2, 0, 0, −10, 50, 0, 0,0, 0, and 0 will be described. As can be seen from Table 4, for the runof one zero, the “AC Run−1” can be 0, the Huffman code can be 1, theHuffman bits can be 1, and there may be no Golomb code. Next, for thevalue of 2 which is preceded by the run of at least one zero, the “|ACValue|−1” can be 1, the Huffman code can be 1111, the Huffman bits canbe 4, there may be no Golomb code, and the sign bit can be 0.Subsequently, for the run of two zeros, the “AC Run−1” can be 1, theHuffman code can be 001, the Huffman bits can be 3, and there may be noGolomb code. Then next, for the value of −10 which is preceded by therun of at least one zero, the “|AC Value|−1” can be 9, the Huffman codecan be 0011001, the Huffman bits can be 7, the Golomb code can beGolomb-Rice(2, 1), and the sign bit can be 1. Then subsequently, for thevalue of 50 which is not preceded by a run of at least one zero, the“|AC Value|−1” can be 49, the Huffman code can be 0000100, the Huffmanbits can be 7, the Golomb code can be Golomb-Rice(18, 3), and the signbit can be 0. Finally, for the remaining run of five zeros, the “ACRun−1” can be 4, the Huffman code can be 011, the Huffman bits can be 3,and the Golomb code can be Golomb-Rice(1, 0).

As further part of the process of the flowchart 600, adaptivecompression may be performed in certain implementations. For example, asize of a compressed frame can be set close to a target number of bytes,such as using the technique described in U.S. Pat. No. 9,800,875, whichwas previously herein incorporated by reference in its entirety. Anentropy index for each slice can moreover be calculated, such as using atechnique described in U.S. Pat. No. 9,800,875, which was previouslyherein incorporated by reference in its entirety. The entropy indexalong with an entropy multiplier can be used to calculate thequantization scale factor. The range of DCT 16×16 may notably be higherthan that of DCT 8×8 for the same 12-bit input.

In some instances, because 32 lines of raw image data may be processedat a time, an image can be divided vertically (or otherwise) into 8 ormore sections. After processing individual sections, a size of thecompressed image thus far can be available. The size of the compressedimage can then be used to update an entropy multiplier. At the end offrame compression, the size of the compressed image can be compared to atarget size to further update the entropy multiplier.

Although some examples herein describe coding ranges or values withinranges using Huffman codes (or algorithms) and Golomb codes (oralgorithms), other codes (or algorithms) can be used. For example, alossless code, a lossy code, a variable length code, or a prefix codemay be used.

In some embodiments, a first algorithm can be used for coding ranges anda second algorithm can be used for coding values within ranges. Thefirst algorithm can, in some instances, be different from the secondalgorithm so that ranges and values within ranges may be codeddifferently. In other instances, the first algorithm can be the same asthe second algorithm.

IV. Video Stream Specification

Video image data, which may be compressed using one or more approachesdisclosed herein, can be organized according to a video streamspecification. The video stream specification can, in someimplementations, include one or more of the following features.

A frame structure in a compressed file can be divided into header anddata portions. The header can be designed to be hardware friendly. Insome instances, all values in the header other than the size of acompressed frame may be known before the compression begins. A headerversion may be used to decode the compressed file, such as for playbackon-camera or off-camera, if revisions were made to the file format. Theheader can, for instance, contain 600 bytes. The header can be followedby slices ordered left to right and top to bottom. Each slice cancontain an integer number of bytes. One example header structure isshown below in Table 5.

TABLE 5 Frame Header Begin Location Bytes Description 0 8 Number ofbytes in compressed frame 8 1 Header: Major Version 9 1 Header: MinorVersion 10 2 Horizontal Size 12 2 Veritical Size 14 1 Macroblocks perslice 15 1 Chroma Format 0 --> 422 1 --> 444 16 2 Number of slices perFrame 18 2 Reserved - Set to 0 20 256 Luma Quantization Table 276 256Chroma Quantization Table 532 14 DC Huffman Table 546 18 AC Value zerorun Huffman table 564 18 AC Value non-zero run Huffman table 582 18 ACrun length Huffman table

Individual entries in a Huffman table can be 2 bytes (16-bits) wide. Asillustrated by Table 6 below, the most significant bits (for example,first 4 bits) of a Huffman table structure can represent a size of theHuffman code, and the least significant bits (for example, last 12 bits)of the Huffman table structure can represent the Huffman code itselfthat may be aligned to the right and left padded with zeros.

TABLE 6 Code Size Huffman Code (4 bits) (12 bits)

Each slice can have a header (for example, 9 bytes) followed by Green 1,Green2, Red, and Blue components. Each component can begin on a byteboundary. If a component may have fractional bytes, the component can bepadded with zeros to form a complete byte. Table 7 below illustrates anexample slice structure.

TABLE 7 Slice Header Green1 Data Green2 Data Red Data Blue Data (9bytes) (Variable) (Variable) (Variable) (Variable)

Table 8 below shows an example slice header structure. The number ofbits of the slice header structure can be specified to avoid confusingpadded bits with Huffman codes of value zero. If the number of bits in acomponent may not be a multiple of 8, a next component can begin on abyte boundary.

TABLE 8 Slice Header Begin Location Bytes Description 0 1 QuantizationScale Factor 1 2 Number of bits in G1 Stream 3 2 Number of bits in G2Stream 5 2 Number of bits in B Stream 7 2 Number of bits in R Stream

V. 3D Image Display

The displays of or connected to the image capture devices describedherein (for example, the display 11 of the device 10 of FIG. 1A) can, insome implementations, be or include 3D displays. A 3D display may beconfigured to produce light so that a 3D image (sometimes referred to as“multi-dimensional content”) is observed by the user. Stereoscopicdisplays may, for instance, be used to form images that appear to a userto be 3D when viewed at the proper angle or using specifically designedeye wear. At least some embodiments are directed to a display that isconfigured to produce an image that appears to be in 3D space, such thata user may be able to view the 3D image from multiple directions withoutmoving the display. The display may not need to be positioned within theuser's field of view. In some embodiments, the 3D image may appear to besuspended or float above the display. Thus, a user may be able to “walkaround” the 3D image to observe different views of the image as thoughthe content in the image was a physical object.

Some embodiments of the 3D display may include a diffractive lightfieldbacklighting system. The diffractive lightfield backlighting system mayinclude a multiview or 3D display and a light source configured for rearillumination of the 3D display. The multiview display may include aplurality of diffractive elements, each including a plurality ofdiffractive gratings, configured to direct light illuminated thereoninto multiple directions. The direction that the light is directed maybe based on the diffractive properties of the diffractive elements. Insome embodiments, the multiple directions may correspond to a differentview of the 3D image. Multiple light rays directed in the same orsubstantially similar direction may form an image corresponding to aparticular view of the 3D content. Accordingly, multiple views of the 3Dcontent may be displayed in multiple directions based on the pluralityof diffractive elements. Some implementations of embodiments herein aredescribed in more detail, for example, in U.S. Pat. No. 9,128,226entitled “Multibeam Diffraction Grating-Based Backlighting” and U.S.Pat. No. 9,459,461 entitled “Directional Backlighting,” the contents ofwhich are each incorporated herein in their entirety. A 3D display maybe separately operable from a 2 Dimensional (2D) display. The 3D displaymay, for instance, be disposed behind or in front of the 2D display. Assuch, the 3D display or 2D display can each be turned on and off withoutaffecting the use of the other.

Other embodiments of the 3D display are possible for generating a 3Dimage. For example, the 3D display may be configured to display a 3Dimage based on a reconstruction of a holographic interference patternassociated with a hologram. The interference pattern may bereconstructed based on features stored in the fringe pattern, and thedisplay may include pixels driven to duplicate the interference fringepattern on a screen. The pixels may be illuminated by a light source,which may be transformed (e.g., varied in phase or transmittance) by theinterference pattern of the pixels to generate a 3D holographic image.Some implementations may be found in, for example, U.S. Pat. No.9,304,491, entitled “Transparent Holographic Display with Dynamic ImageControl”; U.S. Pat. No. 6,760,135, entitled “Holographic Display,” thecontents of which are each incorporated herein in their entirety. Inanother embodiment, the display may include a plurality of holographicpixels that are illuminated modulated using an spatial light modulator,for example, as described in U.S. Pat. No. 7,190,496, entitled “EnhancedEnvironment Visualization Using Holographic Sterograms,” the contents ofwhich is incorporated herein in its entirety.

Advantageously, the 3D display may, in certain embodiments, not need toutilize lenticular lenses or eye tracking technology. Withoutsubscribing to a particular scientific theory, embodiments herein canprovide for higher resolution as compared to displays using lenticularlenses, the 3D display may be separately operable from a standard 2Ddisplay, and the 3D display provides for multi-directional contenthaving multiple views.

Moreover, the image capture devices described herein can, in someimplementations, capture 3D images for reproduction by a 3D display. Forinstance, the first cameras 12, the second cameras 17, images sensors ofthe camera module 30, or image sensors of the video camera can be usedto capture 3D images. In one example, the first cameras 12, the secondcameras 17, or the images sensors of the camera module 30 can be used tocapture 3D images, and the phone 10 can in turn store the 3D images andplayback the 3D images using the display 11. Such a design canfacilitate live or simultaneous capture and display of 3D images.

The 3D content, holographic content, or other content displayed on the3D display can be compressed according to any of the techniquesdescribed herein, such as for example according to the techniques forcompressing raw image data described with respect to FIGS. 3A-6. Forinstance, the phone 10 may capture compressed raw image data using twoor more of the first cameras 12, using the second cameras 17, or one ormore of the image sensors of the camera module 30 (or using a differentcamera module attached to the phone 10). The phone 10 can then recordthe compressed image data in one or more files on a memory device of thephone 10, or in a memory device in a module attached to the phone 10.The phone 10 can then access the image data, decompress it, and prepareit for playback on the display 11 as 3D, holographic content, or thelike, as appropriate. The phone 10 can additionally according to someembodiments play the 3D, holographic, or other content back in real-timewithout first compressing and storing the content, while the phone 10 isrecording.

VI. Additional Embodiments and Terminology

FIG. 7 illustrates the image capture device 50 in communication with aphone 100. The image capture device 50 can, for example, be anembodiment of the camera module 30, and the phone 100 can, for example,be an embodiment of the phone 10. The phone 100 can be modular andcouple to one or more modules as described herein. For example, thephone can mechanically or electrically connect to a power source 60, amemory device 62, or an input/output (I/O) device 64, as well as theimage capture device 50 or one or more other modules 66. In addition,the phone 100 can electrically communicate with one or more othermodules 61, 63, 65, 67 respectively through the power source 60, thememory device 62, the input/output (I/O) device 64, and the imagecapture device 50, and the one or more other modules 61, 63, 65, 67 canrespectively couple to the power source 60, the memory device 62, theinput/output (I/O) device 64, and the image capture device 50.Embodiments and features of modular phones and camera modules arefurther described in U.S. Patent Application Publication No.2017/0171371; the entire disclosure of which is incorporated herein byreference.

FIG. 8 illustrates components of the phone 100. The phone 100 may beconnected to an external device by using an external connection device,such as a sub-communication module 130, a connector 165, and an earphoneconnecting jack 167. The “external device” may include a variety ofdevices, such as earphones, external speakers, Universal Serial Bus(USB) memories, chargers, cradles/docks, Digital Multimedia Broadcasting(DMB) antennas, electronic payment related devices, health care devices(for example, blood sugar testers), game consoles, vehicle navigations,a cellphone, a smart phone, a tablet PC, a desktop PC, a server, and thelike, which are removable from the electronic device and connectedthereto via a cable.

The phone 100 includes a touch screen display 190 and a touch screencontroller 195. The phone 100 also includes a controller 110, a mobilecommunication module 120, the sub-communication module 130, a multimediamodule 140, a camera module 150, a Global Positioning System (GPS)module 155, an input/output module 160, a sensor module 170, a memory175, and a power supply 180. The sub-communication module 130 includesat least one of Wireless Local Area Network (WLAN) 131 and a short-rangecommunication module 132, and the multimedia module 140 includes atleast one of a broadcast communication module 141, an audio play module142, and a video play module 143. The input/output module 160 includesat least one of buttons 161, a microphone 162, a speaker 163, avibration motor 164, the connector 165, and a keypad 166. Additionally,the electronic device 100 can include one or more lights including afirst light 153 that faces one direction and a second light 154 thatfaces another direction.

The controller 110 may include a Central Processing Unit (CPU) 111, aRead Only Memory (ROM) 112 for storing a control program, such as anOperating System (OS), to control the phone 100, and a Random AccessMemory (RAM) 113 for storing signals or data input from an externalsource or for being used as a memory space for working results in thephone 100. The CPU 111 may include a single core, dual cores, triplecores, or quad cores. The CPU 111, ROM 112, and RAM 113 may be connectedto each other via an internal bus.

The controller 110 may control the mobile communication module 120, thesub-communication module 130, the multimedia module 140, the cameramodule 150, the GPS module 155, the input/output module 160, the sensormodule 170, the memory 175, the power supply 180, the touch screendisplay 190, and the touch screen controller 195.

The mobile communication module 120 connects the electronic device 100to an external device through mobile communication using at least aone-to-one antenna or a one-to-many antenna under the control of thecontroller 110. The mobile communication module 120 transmits/receiveswireless signals for voice calls, video conference calls, Short MessageService (SMS) messages, or Multimedia Message Service (MMS) messagesto/from a cell phone, a smart phone, a tablet PC, or another device,with the phones having phone numbers entered into the phone 100.

The sub-communication module 130 may include at least one of the WLANmodule 131 and the short-range communication module 132. For example,the sub-communication module 130 may include either the WLAN module 131or the-short range communication module 132, or both.

The WLAN module 131 may be connected to the Internet in a place wherethere is a wireless Access Point (AP), under the control of thecontroller 110. The WLAN module 131 supports the WLAN Institute ofElectrical and Electronic Engineers (IEEE)802.11x standard. Theshort-range communication module 132 may conduct short-rangecommunication between the phone 100 and an image rendering device underthe control of the controller 110. The short-range communication mayinclude communications compatible with BLUETOOTH™, a short rangewireless communications technology at the 2.4 GHz band, commerciallyavailable from the BLUETOOTH SPECIAL INTEREST GROUP, INC., Infrared DataAssociation (IrDA), WI-FI™ DIRECT, a wireless technology for dataexchange over a computer network, commercially available from the WI-FIALLIANCE, NFC, and the like.

The phone 100 may include at least one of the mobile communicationmodule 120, the WLAN module 131, and the short-range communicationmodule 132 based on the performance requirements of the phone 100. Forexample, the phone 100 may include a combination of the mobilecommunication module 120, the WLAN module 131, and the short-rangecommunication module 132 based on the performance requirements of thephone 100.

The multimedia module 140 may include the broadcast communication module141, the audio play module 142, or the video play module 143. Thebroadcast communication module 141 may receive broadcast signals (forexample, television broadcast signals, radio broadcast signals, or databroadcast signals) and additional broadcast information (for example, anElectric Program Guide (EPG) or an Electric Service Guide (ESG))transmitted from a broadcasting station through a broadcastcommunication antenna under the control of the controller 110. The audioplay module 142 may play digital audio files (for example, files havingextensions, such as mp3, wma, ogg, or way) stored or received under thecontrol of the controller 110. The video play module 143 may playdigital video files (for example, files having extensions, such as mpeg,mpg, mp4, avi, move, or mkv) stored or received under the control of thecontroller 110. The video play module 143 may also play digital audiofiles.

The multimedia module 140 may include the audio play module 142 and thevideo play module 143 except for the broadcast communication module 141.The audio play module 142 or video play module 143 of the multimediamodule 140 may be included in the controller 110.

The camera module 150 may include one or more cameras for capturingstill images or video images under the control of the controller 110.Furthermore, the one or more cameras may include an auxiliary lightsource (for example, a flash) for providing an amount of light forcapturing an image. In one example, one or more cameras may be placed onthe front of the phone 100, and one or more other cameras may be placedon the back of phone 100. Two or more cameras may be arranged, in someimplementations, adjacent to each other (for example, the distancebetween the two or more cameras, respectively, may be in the range of 1cm. to 8 cm.), capturing 3 Dimensional (3D) still images or 3D videoimages.

The GPS module 155 receives radio signals from a plurality of GPSsatellites in orbit around the Earth and may calculate the position ofthe phone 100 by using time of arrival from the GPS satellites to thephone 100.

The input/output module 160 may include at least one of the plurality ofbuttons 161, the microphone 162, the speaker 163, the vibrating motor164, the connector 165, and the keypad 166.

The at least one of the buttons 161 may be arranged on the front, sideor back of the housing of the phone 100, and may include at least one ofa power/lock button, a volume button, a menu button, a home button, aback button, and a search button.

The microphone 162 generates electric signals by receiving voice orsound under the control of the controller 110.

The speaker 163 may output sounds externally corresponding to varioussignals (for example, radio signals, broadcast signals, digital audiofiles, digital video files or photography signals) from the mobilecommunication module 120, sub-communication module 130, multimediamodule 140, or camera module 150 under the control of the controller110. The speaker 163 may output sounds (for example, button-press soundsor ringback tones) that correspond to functions performed by theelectronic device 100. There may be one or multiple speakers 163arranged in at least one position on or in the housing of the phone 100.

The vibrating motor 164 may convert an electric signal to a mechanicalvibration under the control of the controller 110. For example, thephone 100 in a vibrating mode operates the vibrating motor 164 whenreceiving a voice call from another device. There may be at least onevibration motor 164 inside the housing of the phone 100. The vibrationmotor 164 may operate in response to a touch activity or continuoustouches of a user over the touch screen display 190.

The connector 165 may be used as an interface for connecting the phone100 to the external device or a power source. Under the control of thecontroller 110, the phone 100 may transmit data stored in the memory 175of the electronic device 100 to the external device via a cableconnected to the connector 165, or receive data from the externaldevice. Furthermore, the phone 100 may be powered by the power sourcevia a cable connected to the connector 165 or may charge the batteryusing the power source.

The keypad 166 may receive key inputs from the user to control the phone100. The keypad 166 includes a mechanical keypad formed in the phone100, or a virtual keypad displayed on the touch screen display 190. Themechanical keypad formed in the phone 100 may optionally be omitted fromthe implementation of the phone 100, depending on the performancerequirements or structure of the phone 100.

An earphone may be inserted into the earphone connecting jack 167 andthus, may be connected to the phone 100.

A stylus pen 168 may be inserted and removably retained in the phone 100and may be drawn out and detached from the phone 100.

A pen-removable recognition switch 169 that operates in response toattachment and detachment of the stylus pen 168 is equipped in an areainside the phone 100 where the stylus pen 168 is removably retained, andsends a signal that corresponds to the attachment or the detachment ofthe stylus pen 168 to the controller 110. The pen-removable recognitionswitch 169 may have a direct or indirect contact with the stylus pen 168when the stylus pen 168 is inserted into the area. The pen-removablerecognition switch 169 generates the signal that corresponds to theattachment or detachment of the stylus pen 168 based on the direct orindirect contact and provides the signal to the controller 110.

The sensor module 170 includes at least one sensor for detecting astatus of the phone 100. For example, the sensor module 170 may includea proximity sensor for detecting proximity of a user to the phone 100,an illumination sensor for detecting an amount of ambient light of theelectronic device 100, a motion sensor for detecting the motion of thephone 100 (for example, rotation of the phone 100, acceleration orvibration applied to the phone 100), a geomagnetic sensor for detectinga point of the compass using the geomagnetic field, a gravity sensor fordetecting a direction of gravity, and an altimeter for detecting analtitude by measuring atmospheric pressure. At least one sensor maydetect the status and generate a corresponding signal to transmit to thecontroller 110. The sensor of the sensor module 170 may be added orremoved depending on the performance requirements of the phone 100.

The memory 175 may store signals or data input/output according tooperations of the mobile communication module 120, the sub-communicationmodule 130, the multimedia module 140, the camera module 150, the GPSmodule, the input/output module 160, the sensor module 170, the touchscreen display 190 under the control of the controller 110. The memory175 may store the control programs and applications for controlling thephone 100 or the controller 110.

The term “storage” can refer to the memory 175, and also to the ROM 112,RAM 113 in the controller 110, or a memory card (for example, a SecureDigital (SD) card, a memory stick, and the like) installed in the phone100. The storage may also include a non-volatile memory, a volatilememory, a Hard Disc Drive (HDD), a Solid State Drive (SSD), and thelike.

The power supply 180 may supply power from at least one battery placedinside the housing of the phone 100 under the control of the controller110. The at least one battery can thus power the phone 100. The powersupply 180 may supply the phone 100 with the power input from theexternal power source via a cable connected to the connector 165. Thepower supply 180 may also supply the phone 100 with wireless power froman external power source using a wireless charging technology.

The touch screen controller 195 receives information (for example,information to be generated for making calls, data transmission,broadcast, or photography) that is processed by the controller 110,converts the information to data to be displayed on the touch screendisplay 190, and provides the data to the touch screen display 190. Thetouch screen display 190 displays the data received from the touchscreen controller 195. For example, in a call mode, the touch screendisplay 190 may display a User Interface (UI) or a Graphic UserInterface (GUI) with respect to a call. The touch screen display 190 mayinclude at least one of liquid crystal displays, thin filmtransistor-liquid crystal displays, organic light-emitting diodes,flexible displays, 3D displays (for instance, for presenting 3D imagesas described herein), multiview displays, electrophoretic displays, orcombinations of the same and the like. The touch screen display 190moreover can be used to present video images as described herein, suchas including 2D video images, 3D video images, and 2D/3D virtual reality(VR), augmented reality (AR), and mixed reality (MR). In someimplementations, the phone 100 further includes a holographic modulethat processes and outputs holographic video images for presentation,such as on the touch screen display 190 or another display of the phone100.

The touch screen display 190 may be used as an output device and also asan input device, and for the latter case, may have a touchscreen panelto operate as a touch screen. The touch screen display 190 may send tothe touch screen controller 195 an analog signal that corresponds to atleast one touch to the UI or GUI. The touch screen display 190 maydetect the at least one touch by a user's physical contact (for example,by fingers including a thumb) or by a touchable input device (forexample, the stylus pen). The touch screen display 190 may also receivea dragging movement of a touch among at least one touch and transmit ananalog signal that corresponds to the dragging movement to the touchscreen controller 195. The touch screen display 190 may be implementedto detect at least one touch in, for example, a resistive method, acapacitive method, an infrared method, an acoustic wave method, and thelike.

The term “touches” is not limited to physical touches by a physicalcontact of the user or contacts with the touchable input device, but mayalso include touchless proximity (for example, maintaining a detectabledistance less than 1 mm. between the touch screen display 190 and theuser's body or touchable input device). The detectable distance from thetouch screen display 190 may vary depending on the performancerequirements of the phone 100 or structure of the phone 100, and moreparticularly, the touch screen display 190 may output different values(for example, current values) for touch detection and hovering detectionto distinguishably detect that a touch event occurred by a contact withthe user's body or the touchable input device and a contactless input(for example, a hovering event). Furthermore, the touch screen display190 may output different values (for example, current values) forhovering detection over distance from where the hovering event occurs.

The touch screen controller 195 converts the analog signal received fromthe touch screen display 190 to a digital signal (for example, in XYcoordinates on the touch panel or display screen) and transmits thedigital signal to the controller 110. The controller 110 may control thetouch screen display 190 by using the digital signal received from thetouch screen controller 195. For example, in response to the touch eventor the hovering event, the controller 110 may enable a shortcut icondisplayed on the touch screen display 190 to be selected or to beexecuted. The touch screen controller 195 may also be incorporated inthe controller 110.

Further, the touch screen controller 195 may determine the distancebetween where the hovering event occurs and the touch screen display 190by detecting a value (for example, a current value) output through thetouch screen display 190, convert the determined distance to a digitalsignal (for example, with a Z coordinate), and provide the digitalsignal to the controller 110.

One of more of the components or modules of the phone 100 can beremovably coupled to a housing of the phone 100. To help illustrate thiscoupling, the housing of the phone 100 may be understood to be the phone10, while the one of more of the components or modules can be removablycoupled to the phone 10 via the module connector 20 to add or removefunctionality for the phone 10. As one example, a portion or all of thecamera module 30 can be removably coupled to the phone 10 to provide thephone 10 with the functionality of part or all the camera module 30.

While certain electronic devices shown and described herein arecellphones, other handheld electronic device embodiments are notcellphones, and do not include telephonic capability. For instance, someembodiments have the same or similar exterior as the electronic devicesdescribed herein, but do not include telephonic capability, such as inthe case of a tablet computing device or digital camera. Suchembodiments may nonetheless include any combination of the non-telephonecomponents and functionality described herein, such as one or more ofthe following or portions thereof: controller 110, touch screen display190 and touch screen controller 195, camera module 150, multi-mediamodule 140, sub-communication module 130, first light 153, second light154, GPS module 155, I/O module 160, and memory 176.

FIG. 9A illustrates a perspective view of the phone 10 positioned forattachment to an expander module 900 and the camera module 30, and FIG.9B illustrates a perspective view of the phone 10, the expander module900, and the camera module 30 when attached. The expander module 900 caninclude a memory device, a battery, or other component for enhancing thecapacity of the phone 10. The expander module 900 can include a housingthat supports magnets, which can be similar in structure and function tothose of the camera module 30 in FIGS. 1C and 1D. The magnets canfacilitate coupling of the housing to the phone 10 on one side and thecamera module 30 on the other side. Additionally or alternatively,coupling can be achieved at least via a friction fit, interlockingstructures, fasteners, mechanical snap surface structures, mechanicallatch surface structures, mechanical interference fit surfacestructures, or the like.

The expander module 900 can also include module connectors (for example,two module connectors with one expander module connector 910 forcoupling to a corresponding connector (now shown) on the camera module30 and another expander module connector (not shown) for coupling to themodule connector 20), similar to or the same as the module connector 20,that can interchangeably couple with a module and receive power or datafrom or transmit power or data to the module or one or more otherdevices coupled to the module.

Although Green1 and Green2 may be described as processed separately ordifferently in some instances herein, Green1 and Green2 may or may notbe processed separately or differently. For example, Green1 and Green2pixels can be separated into separate DCT macroblocks or may not beseparated into separate DCT macroblocks. As another example, Green1 andGreen2 pixels can be separated into separate scans or may not beseparated into separate scans. In yet another example, a slice structurecan have separate portions for Green1 and Green2 or may not haveseparate portions for Green1 and Green2. In a further example, Green1and Green2 can have separate sizes in a slice header structure or maynot have separate sizes in the slice header structure.

The various image capture devices (or certain components of the devices)may be described herein as being “configured to” perform one or morefunctions. As used herein this means that the device is capable of beingplaced in at least one mode (for example, user selectable modes) inwhich the device performs the specified functions. For example, thedevice may not necessarily perform the specified functions in all of theoperational modes. Along these lines, use of the phrase “configured to”does not imply that the device has to actually be currently placed inthe operational mode to be “configured to” perform the function, butonly that the device is capable of being (for example, programmed to be)selectively placed into that mode.

As used herein, a phrase referring to “at least one of” a list of itemsrefers to any combination of those items, including single members. Asan example, “at least one of: a, b, or c” is intended to cover: a, b, c,a-b, a-c, b-c, and a-b-c.

The various illustrative logics, logical blocks, modules, circuits andalgorithm steps described in connection with the implementationsdisclosed herein may be implemented as electronic hardware, computersoftware, or combinations of both. The interchangeability of hardwareand software has been described generally, in terms of functionality,and illustrated in the various illustrative components, blocks, modules,circuits and steps described above. Whether such functionality isimplemented in hardware or software depends upon the particularapplication and design constraints imposed on the overall system.

The hardware and data processing apparatus used to implement the variousillustrative logics, logical blocks, modules and circuits described inconnection with the aspects disclosed herein may be implemented orperformed with a single- or multi-chip processor, a digital signalprocessor (DSP), an application specific integrated circuit (ASIC), afield programmable gate array (FPGA) or other programmable logic device,discrete gate or transistor logic, discrete hardware components, or anycombination thereof designed to perform the functions described herein.A processor may be a microprocessor, or, any processor, controller,microcontroller, or state machine. A processor also may be implementedas a combination of electronic devices, such as a combination of a DSPand a microprocessor, a plurality of microprocessors, one or moremicroprocessors in conjunction with a DSP core, or any other suchconfiguration. In some implementations, particular steps and methods maybe performed by circuitry that is specific to a given function.

In one or more aspects, the functions described may be implemented inhardware, digital electronic circuitry, computer software, firmware,including the structures disclosed in this specification and theirstructural equivalents thereof, or in any combination thereof.Implementations of the subject matter described in this specificationalso can be implemented as one or more computer programs, for example,one or more modules of computer program instructions, encoded on acomputer storage media for execution by, or to control the operation of,data processing apparatus.

If implemented in software, the functions may be stored on ortransmitted over as one or more instructions or code on acomputer-readable medium. The steps of a method or algorithm disclosedherein may be implemented in a processor-executable software modulewhich may reside on a computer-readable medium. Computer-readable mediaincludes both computer storage media and communication media includingany medium that can be enabled to transfer a computer program from oneplace to another. Storage media may be any available media that may beaccessed by a computer. By way of example, and not limitation, suchcomputer-readable media may include RAM, ROM, EEPROM, CD-ROM or otheroptical disk storage, magnetic disk storage or other magnetic storagedevices, or any other medium that may be used to store desired programcode in the form of instructions or data structures and that may beaccessed by a computer. Combinations of the above also may be includedwithin the scope of computer-readable media. Additionally, theoperations of a method or algorithm may reside as one or any combinationor set of codes and instructions on a machine readable medium andcomputer-readable medium, which may be incorporated into a computerprogram product.

Various modifications to the implementations described in thisdisclosure may be readily apparent to those skilled in the art, and thegeneric principles defined herein may be applied to otherimplementations without departing from the spirit or scope of thisdisclosure. Thus, the claims are not intended to be limited to theimplementations shown herein, but are to be accorded the widest scopeconsistent with this disclosure, the principles and the novel featuresdisclosed herein.

Certain features that are described in this specification in the contextof separate implementations also can be implemented in combination in asingle implementation. Conversely, various features that are describedin the context of a single implementation also can be implemented inmultiple implementations separately or in any suitable subcombination.Moreover, although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Unless the context clearly requires otherwise, throughout thedescription and the claims, the words “comprise,” “comprising,” and thelike are to be construed in an inclusive sense, as opposed to anexclusive or exhaustive sense; that is to say, in the sense of“including, but not limited to.” The word “coupled”, as generally usedherein, refers to two or more elements that may be either directlyconnected, or connected by way of one or more intermediate elements.Likewise, the word “connected”, as generally used herein, refers to twoor more elements that may be either directly connected, or connected byway of one or more intermediate elements. Additionally, the words“herein,” “above,” “below,” and words of similar import, when used inthis application, shall refer to this application as a whole and not toany particular portions of this application. Where the context permits,words in the above Detailed Description using the singular or pluralnumber may also include the plural or singular number respectively. Theword “or” in reference to a list of two or more items, that word coversall of the following interpretations of the word: any of the items inthe list, all of the items in the list, and any combination of the itemsin the list.

Moreover, conditional language used herein, such as, among others,“can,” “could,” “might,” “can,” “for example,” “for example,” “such as”and the like, unless specifically stated otherwise, or otherwiseunderstood within the context as used, is generally intended to conveythat certain embodiments include, while other embodiments do notinclude, certain features, elements or states. Thus, such conditionallanguage is not generally intended to imply that features, elements orstates are in any way required for one or more embodiments or that oneor more embodiments necessarily include logic for deciding, with orwithout author input or prompting, whether these features, elements orstates are included or are to be performed in any particular embodiment.

The above detailed description of embodiments is not intended to beexhaustive or to be limiting to the precise form disclosed above. Whilespecific embodiments and examples are described above for illustrativepurposes, various equivalent modifications are possible within the scopeof the inventions described herein, as those skilled in the relevant artwill recognize. For example, while processes or blocks are presented ina given order, alternative embodiments may perform routines havingsteps, or employ systems having blocks, in a different order, and someprocesses or blocks may be deleted, moved, added, subdivided, combined,or modified. Each of these processes or blocks may be implemented in avariety of different ways. Also, while processes or blocks are at timesshown as being performed in series, these processes or blocks mayinstead be performed in parallel, or may be performed at differenttimes.

The teachings provided herein can be applied to other systems, not onlythe systems described above. The elements and acts of the variousembodiments described above can be combined to provide furtherembodiments.

While certain embodiments of the inventions have been described, theseembodiments have been presented by way of example only, and are notintended to limit the scope of the disclosure. Indeed, the novel methodsand systems described herein may be embodied in a variety of otherforms; furthermore, various omissions, substitutions and changes in theform of the methods and systems described herein may be made withoutdeparting from the spirit of the disclosure. The accompanying claims andtheir equivalents are intended to cover such forms or modifications aswould fall within the scope and spirit of the disclosure.

1. (canceled)
 2. An electronic device, comprising: a housing; an imagesensor configured to generate image data from light incident on theimage sensor; a memory device; and one or more processors configured to:apply a lossy transform to the image data, such that at least somedigital values in an input domain are lumped to a single value in anoutput domain; transform the image data to obtain transformcoefficients; quantize the transform coefficients to obtain quantizedtransform coefficients including a first quantized transform coefficientand a second quantized transform coefficient different from the firstquantized transform coefficient; encode the quantized transformcoefficients to obtain encoded coefficients; and store the encodedcoefficients to the memory device in a compressed file, wherein thecompressed file is not tonally processed, and tonal processing on thecompressed file is deferred.
 3. The electronic device of claim 2,wherein the one or more processors are configured to quantize thetransform coefficients by at least using at least a first quantizationtable and a second quantization table different from the firstquantization table.
 4. The electronic device of claim 2, wherein the oneor more processors are configured to apply noise filtering to the imagedata.
 5. The electronic device of claim 2, wherein the compressed filecomprises YUV data.
 6. The electronic device of claim 2, wherein thelossy transform comprises a piecewise linear function that converts theimage data from a first bit-width to a second bit-width.
 7. Theelectronic device of claim 2, wherein the one or more processors areconfigured to quantize the transform coefficients using a firstalgorithm and a second algorithm different than the first algorithm. 8.The electronic device of claim 7, wherein the first algorithm comprisesdetermining Huffman codes and the second algorithm comprises determiningGolomb codes.
 9. The electronic device of claim 7, wherein the one ormore processors is configured to vary the first algorithm duringprocessing of the image data.
 10. The electronic device of claim 9,wherein the one or more processors is configured to vary the firstalgorithm from processing a first frame of the image data to processinga second frame of the image data.
 11. The electronic device of claim 9,wherein the second algorithm remains constant during processing of theimage data by the one or more processors.
 12. The electronic device ofclaim 2, wherein the one or more processors is configured to transformthe image data using a discrete cosine transform.
 13. The electronicdevice of claim 2, wherein the one or more processors is configured toencode the quantized transform coefficients at least by encoding DCcoefficients of the quantized transform coefficients differently from ACcoefficients of the quantized transform coefficients.
 14. The electronicdevice of claim 2, wherein the electronic device is a mobile phone. 15.The electronic device of claim 2, wherein the housing is configured toenclose the image sensor, the memory device, and the one or moreprocessors, and the housing is configured to removably attach to aelectronic device.
 16. The electronic device of claim 2, wherein thecompressed file comprises still image data.
 17. The electronic device ofclaim 2, wherein the compressed file comprises motion video image data.18. The electronic device of claim 2, further comprising a displayconfigured to present holographic images generated by the one or moreprocessors from the image data.
 19. A method of capturing an processingimage data, comprising: with an image sensor, generating image data fromlight incident on the image sensor; applying a transform to the imagedata such that at least some digital values in an input domain arelumped to a single value in an output domain; compressing the imagedata, said compressing comprising: transforming the image data to obtaintransform coefficients; quantizing the transform coefficients to obtainquantized transform coefficients including a first quantized transformcoefficient and a second quantized transform coefficient different fromthe first quantized transform coefficient; and encoding the quantizedtransform coefficients to obtain encoded coefficients; and storing theencoded coefficients to a memory device in a compressed file, whereinthe compressed file is not tonally processed, and tonal processing onthe compressed file is deferred.
 20. The method of claim 19, furthercomprising applying noise filtering to the image data.
 21. The method ofclaim 19, wherein the compressed file comprises YUV data.